package com.yuanthink.gwt.client;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
import com.yuanthink.gwt.client.eventbus.EventBus;

/**
 * 
 * @author 06peng
 *
 */
@SuppressWarnings("rawtypes")
public class AppController implements ValueChangeHandler, IController {

	EventBus eventBus;
	
	public AppController(EventBus eventBus) {
		this.eventBus = eventBus;
	}
	 
	@Override
	public void setEventBus(EventBus eventBus) {
		 this.eventBus = eventBus;
	}

	@Override
	public EventBus getEventBus() {
		return eventBus;
	}

	@SuppressWarnings("unchecked")
	@Override
	public void bind() {
		 History.addValueChangeHandler(this);
	}

	@Override
	public void go(LayoutContainer container) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onValueChange(ValueChangeEvent event) {
		// TODO Auto-generated method stub
		
	}

}
